<?php $tmp=0 ?>
<?php $headings=false ?>
<?php if(count($gridattribute)<=0): ?>
<?php echo "No attribute found" ?>
<?php else: ?>

<table style="border: none; width: 99%; padding-bottom: 20px; padding-top: 10px;" cellpadding="0" cellspacing="0">
    <?php foreach($gridattribute as $r): ?>
<?php if ($headings==false): ?>
    <tr><td colspan="3" style="border: none">
            <table cellpadding="0" cellspacing="0" width="auto">
                <tr style="height: 30px">
                    <td style="border: none; vertical-align: top" align="left" rowspan="4">
                        <img style="margin:0px;border: none"  src="/images/amjad.jpg" width="48px" height="48"/>
                    </td>
                    <td style="border: none;text-align: left " align="left" colspan="2">
                       <span style='color:#9f9f8a;font-weight:bold;'><?php echo $r->Observationdepth->Observation->Research->Entity["firstname"] . $r->Observationdepth->Observation["observationdate"] ?></span>
                    </td>
                    
                </tr>
                <tr style="height: 30px">
                    <td style="border: none;text-align: left" align="left">
                       <span style='color:#9f9f8a;font-weight:bold;'>Title:</span>
                    </td>
                    <td style="border: none;text-align: left" align="left">
                         <?php echo  $r->Observationdepth->Observation->Research["title"] ?>
                    </td>
                </tr>
                <tr style="height: 30px">
                    <td style="border: none;text-align: left" align="left">
                    <span style='color:#9f9f8a;font-weight:bold;'>   Citation: </span>
                    </td>
                    <td style="border: none;text-align: left" align="left">
                         <?php echo  $r->Observationdepth->Observation->Research["citation"] ?>
                    </td>
                </tr>
                <tr >
                    <td align="left" colspan="2" style=" text-align: left;border: none">
                        <table cellpadding="0" cellspacing="0" style="border: solid 1px #d9d9c6;border-right: none; border-bottom: none; width: 100%" >
                        <th style="width: 200px; text-align: left;" >
                       <span style='color:#9f9f8a;font-weight:bold;'>   Attribute</span>
                        </th>
                        <th style="width: 200px">
                       <span style='color:#9f9f8a;font-weight:bold;'>      Value</span>
                        </th>
                        <th style="width: 200px">
                            <span style='color:#9f9f8a;font-weight:bold;'>Unit</span>
                        </th>
                    <?php endif ?>
                    <?php $headings =true ?>
                    <tr>
                    <td style="text-align: left">
                    <?php echo $r->Attribute["attributename"] ?>
                    </td>
                    <td>
                    <?php echo $r["attributevalue"] ?>
                    </td>
                    <td>
                    <?php echo $r->Unit["unit"] ?>
                    </td>
                    </tr>
                    <?php endforeach; ?>
                    </table>
                    </td>
                </tr>
                <tr >

                </tr>
            </table>
        </td>
    </tr>
    
    
</table>
<?php endif ?>